<?xml version="1.0" encoding="UTF-8"?>
<!--

       Copyright 2006-2016 the original author or authors.

       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.

-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Building from Source</title>
    <link rel="stylesheet" type="text/css" href="../mbgstyle.css"/>
</head>
<body>
<h1>Building from Source</h1>
<p>All MyBatis Generator (MBG) distributions include source code. The only compile time dependency
    is on <code>ant.jar</code> - for successful compilation of the included Ant task.
    It is straight forward to compile MBG from source - simply unzip the source in
    a distribution and compile it with your favorite tool.</p>
<p>The MBG distribution does not contain the tests that are run during the build,
    or other classes that are a necessary part of the build. If you would like to
    inspect those classes, or build MBG from the very latest version of the source code
    at Google then follow these steps:</p>
<ol>
    <li>MBG is built with Apache Maven. First you must get maven
        running. If you are new to Maven, here are the most simple steps (for Windows):
        <ol type="a">
            <li>Download a Maven distribution from <a target="_blank" href="http://maven.apache.org/">
                http://maven.apache.org/</a></li>
            <li>Unzip the distribution somewhere convenient</li>
            <li>Setup environment variables and the PATH. Examples:<br/>
                set JAVA_HOME=C:\Program Files\java\jdk1.8.0_91<br/>
                set M2_HOME=C:\JavaTools\apache-maven-3.3.9<br/>
                set PATH=%PATH%;%M2_HOME%\bin;
            </li>
        </ol>
    </li>
    <li>Clone or fork the official Git repo on GitHub
        <a target="_blank" href="https://github.com/mybatis/generator">
            https://github.com/mybatis/generator</a>
    </li>
    <li>Open a command window in the directory where you checked out the source and
        run the command <code>mvn clean install</code> - or any of the other Maven lifecycle commands.
    </li>
</ol>


</body>
</html>
